package com.csd.action.team;

import com.csd.helper.ActionResult;
import com.csd.pojo.Team;
import com.csd.serviceImpl.TeamService;

/**
 * 
 * 团队注册
 * @author csd
 * @version 1.0
 * 
 * <br> 修订时间：2009-12-17
 * <br> 修改原因：创建文件
 * <br> 修改人：刘世彬
 * 
 * <br> 
 * 
 */
public class TeamRegisterAction {
	/**新团队*/
	private Team newteam;

	private TeamService service;
	
	public TeamService getService() {
		return service;
	}

	public void setService(TeamService service) {
		this.service = service;
	}

	public Team getNewteam() {
		return newteam;
	}

	public void setNewteam(Team newteam) {
		this.newteam = newteam;
	}
	
	public String execute(){
		String result = ActionResult.fail;
		
		if(service.saveTeam(this.newteam))
		{
			result = ActionResult.success;
		}
		
		return result;
	}
}
